My question is simple, I want this string:
//input string
<div class=“element”>
<span>text</span>
</div>
to look like this:
//output string
<div class="element">\n\t<span>text</span>\n</div>
First I thought that I can do it with the .replace() function but I don't know how to target the \n and \t in a way that I can replace those.
I use a textbox as in and output. I need it in one line because I want to writ it to a JSON object and it does not support multiline strings.